package 对象之多态.抽象类.案例;

public class text {
    public static void main(String[] args) {
//测式程序员类
        Employee en = new Coder();
        en.work();

        //测式经理类
        Employee en2 = new Manager();
        en2.work();
        System.out.println("=========");

        //快速实例化对象
        //创建一个姓名叫张三，工资30000，工号为：研发部007的程序员
        Coder c = new Coder();
        c.setName("张三");
        c.setSalary(30000);
        c.setId("研发部007");
        System.out.println("姓名：" + c.getName());
        System.out.println("工资：" + c.getSalary());
        System.out.println("工号：" + c.getId());

        System.out.println("===============");
        Coder c1 = new Coder("张三", 30000, "研发部002");
        System.out.println("姓名：" + c1.getName());
        System.out.println("工资：" + c1.getSalary());
        System.out.println("工号：" + c1.getId());

        System.out.println("=========================");
        Manager manager = new Manager("李四", 40000, "研发部01",
                10000);
        System.out.println("姓名：" + manager.getName());
        System.out.println("工资：" + manager.getSalary());
        System.out.println("工号：" + manager.getId());
        System.out.println("奖金：" + manager.getBonus());
    }
}